package com.zhq.blog.core.domain.game.support;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.zhq.blog.core.domain.BaseRepository;

/**
 * @title:CathecticModelDetailRepository.java
 * @package com.zhq.blog.core.domain.game.support
 * @author 张恒强
 * @date 2014年12月26日 下午2:41:09
 * @version V1.0
 */
public interface CathecticModelDetailRepository extends JpaRepository<CathecticModelDetail,Long>,
					BaseRepository<CathecticModelDetail>,JpaSpecificationExecutor<CathecticModelDetail>{
	
	
	@Query("select c from CathecticModelDetail c where c.deleted = 0 and c.modelId = :modelId and c.betNumber = :betnumber")
	List<CathecticModelDetail> find_by_betnumber_modelId(@Param("modelId") long modelId,@Param("betnumber")int betnumber);
	
	
	@Query("select c from CathecticModelDetail c where c.deleted = 0 and c.modelId = :modelId")
	List<CathecticModelDetail> find_by_modelId(@Param("modelId") long modelId);
}
